package com.example.autumn.controller.portal;

import com.example.autumn.entity.Account;
import com.example.autumn.service.IAccountService;
import com.example.autumn.service.IAccountTccService;
import com.example.common.response.R;
import io.swagger.annotations.Api;
import org.apiguardian.api.API;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author Liaorun
 */
@Api("测试sharding jdbc 添加查询没有分表的表是否正常")
@RestController
@RequestMapping("/account")
public class AccountController {

    @Autowired
    IAccountService accountService;

    @GetMapping("/get")
    public R<Account> getAccountById(@RequestParam Integer id) {
        return accountService.getAccountById(id);
    }

    @PostMapping("/insert")
    public R<Boolean> insert(@RequestBody Account account){
        return accountService.insertEntity(account);
    }
}
